<template>
  <div id="verify">
    <div class="title-wrapper"><div class="pro">产品详情</div></div>
    <div class="content">
      <div>
        <h2>我们的优势：</h2>
        <p class="benefit"><i class="el-icon-circle-check"></i>精准识别定位合同信息</p>
        <p class="benefit"><i class="el-icon-circle-check"></i>法律专家与技术团队深度合作</p>
        <p class="benefit"><i class="el-icon-circle-check"></i>可跨行业迁移,支持多种场景</p>
      </div>
      <div class="box">
        <div>
          <h2>{{item.name}}</h2>
          <p style="font-size: 30px;color: red">${{item.price}}</p>
            <el-button type="primary"
                       @click="purchase"
                       style="width: 150px;background-color: #1ddb82;font-size: 20px">购买</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Verify",
    data(){
      return{
        item:{
          name:'合同审核',
          price : 299
        },
        form:{}
      }
    },
    methods: {
      purchase() {
        if (sessionStorage.getItem('isLogin') === '0') {
          this.$router.push('/login')
        } else if (sessionStorage.getItem('userType') == 'server') {
          alert('您当前登录身份为服务方，无法下单。如需下单请退出系统使用采买方身份登录！')
        } else {
          this.form.ber_id = this.$store.getters.getInfo.ber_id
          this.form.or_kind = 1
          this.form.or_product = this.item.name
          this.form.or_money = this.item.price
          this.form.ser_id = ''
          this.form.or_pay = 0
          this.form.or_url = ''

          this.$router.push({
            name: 'Pay',
            params: {
              form: this.form
            }
          })
        }
      }
    }
  }
</script>

<style scoped>
  .pro{
    background-color: #ffffff;
    width: 200px;
    height: 40px;
    border-top: 4px solid #0d6eb8;
    color: #0d6eb8;
    font-size: 18px;
    line-height: 40px;
  }
  .content{
    text-align: left;
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-around;
  }
  .content .benefit{
    margin: 50px 10px;
  }
  .content .benefit i{
    color: red;
    font-size: 25px;
    margin: 0 20px;
  }
  .box{
    width: 400px;
    height: 300px;
    padding-top: 50px;
    border: 1px solid #666;
    box-shadow: 0 0 10px #333;
    text-align: center;
    border-radius: 10px;
    background: url("../../../assets/images/合同审核.png");
    background-size: 400px 300px;
    margin: 0 100px;
    color: #ffffff;
  }
</style>